#ifndef _MHD_utils_H
#define _MHD_utils_H
#include "fclude.h"
#include <microhttpd.h>
#define   MAX_URL_LEN 256

struct mime_type_s {
        char    *       ext;
        char    *       mime_type;
};

 typedef struct appcon_info{
                struct MHD_Connection * connection ;
                const char * url ;
                char *post_data;
                const char *request_mime_type;
                char * response ;
                const char * method ;
}app_con_info_t ,* app_con_info_p;

int parse_url_node(const char *url, char *root, int start) ;
int getMimeType(const char * filename,char **MimeType);

int response_write(struct MHD_Connection *connection,const char * mimeType, unsigned int status_code, char * format, ...);

int unsupported_handler(struct MHD_Connection *connection) ;


inline int html_file_return (struct MHD_Connection *connection,
                const char *page,int status_code);
#endif
